module.exports = {
  configureWebpack: {
    externals: {
    BMap: "BMap",
    AMap:"Amap"
    }
  },
  
    chainWebpack: config => {
        config.module
            .rule('scss')
            .test(/\.scss$/)
            .oneOf('vue')
            .use('px2rem-loader')
            .loader('px2rem-loader')
            .before('postcss-loader') // this makes it work.
            .options({
                remUnit: 37.5, //根据视觉稿，rem为px的十分之一，750px  75rem
                remPrecision: 8 //保留8位小数
            })
            .end()
    },
    devServer: {
      host:'10.161.29.91',
      port:'8000',
        proxy: {
          '/api': {
            target: 'http://10.161.29.104:3000/api',
            ws: true,
            changeOrigin: true,
            pathRewrite: {
              '^/api': ''
            }
          }
        }
    },
}
